import { defineStore } from 'pinia'

// interface StatusMessage {
// 	ok: Boolean
// 	status: number
// 	message: string
// }

interface PeriodDateOne {
	id: number
	nmonth: string
	dn_pl: Date
	dk_pl: Date
	dn_lg: Date
	dk_lg: Date
	years: number
	months: number
}

// interface PeriodDatesIn extends StatusMessage {
// 	dates: PeriodDateOne[]
// }


export const periodDateStore = defineStore('periodDates', () => {
	const periods = ref<PeriodDateOne[]>([]);
	// const periods = ref([]);

	function setPeriodsDates(dates: PeriodDateOne[]) {
		periods.value = dates;
	}

	return { periods, setPeriodsDates }
})